[bits 32]

global start							; making entry point visible to linker
extern kmain							; kmain is defined elsewhere

section .text
align 4

; reserve initial kernel stack space
STACKSIZE equ 0x4000					; that's 16k.

start:
	mov esp, stack + STACKSIZE			; set up the stack
	push eax							; pass my BOOTDATA structure

	call kmain							; call kernel proper

	cli
hang:
	hlt									; halt machine should kernel return
	jmp hang

section .bss
align 4
stack:
	resb STACKSIZE						; reserve 16k stack on a doubleword boundary
